import { sm4 } from 'sm-crypto-v3'

// SM3加密
export const sm4Crypt = (text: string): string => {
  const key = 'af8a1bb5f950cb95cea0781ab2fa5920'
  // @ts-ignore
  return sm4.encrypt(text, key, {
    output: 'string'
  })
}

// SM3加密
export const sm4DECrypt = (text: string): string => {
  const key = 'af8a1bb5f950cb95cea0781ab2fa5920'
  // @ts-ignore
  return sm4.decrypt(text, key, {
    output: 'string'
  })
}
